def my_write(s):
    file = open('b.txt', 'a', encoding='utf-8')
    file.write(s)
    file.write('\n')
    file.close()


def my_write_list(file, lst):
    f = open(file, 'a', encoding='utf-8')
    f.writelines(lst)
    f.close()


if __name__ == '__main__':
    # my_write('今天过得怎样')
    # my_write('心情好好，阳光暖暖！')
    lst = ['姓名\t', '年龄\t', '成绩\n', '张三\t', '26\t', '99']
    my_write_list('c.txt', lst)
